package com.fr.schedule.web;

import com.fr.json.JSONArray;
import com.fr.schedule.entry.SAPSynManager;
import com.fr.web.core.ActionNoSessionCMD;
import com.fr.web.utils.WebUtils;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.PrintWriter;

public class ScheduleGetAllSAPTranTasksAction extends ActionNoSessionCMD {

    public void actionCMD(HttpServletRequest req, HttpServletResponse res) throws Exception {
        PrintWriter printWriter = WebUtils.createPrintWriter(res);

        JSONArray ja = SAPSynManager.getAllTasks();
        printWriter.print(ja.toString());

        printWriter.flush();
        printWriter.close();
    }

    public String getCMD() {
        return "se_getall_st_task";
    }

}
